package com.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_Xiaochi
 * Date: 2025/8/9
 * Time: 15:35
 */
@AllArgsConstructor
@Getter
public enum ActivityPrizeTiersEnum {
    FIRST_PRIZE(1, "一等奖"),
    SECOND_PRIZE(2, "二等奖"),
    THIRD_PRIZE(3, "三等奖");

    private final Integer code;
    private final String message;

    public static ActivityPrizeTiersEnum forName(String name) {
        for (ActivityPrizeTiersEnum activityPrizeTiresEnum : ActivityPrizeTiersEnum.values()) {
            if (activityPrizeTiresEnum.name().equalsIgnoreCase(name)) {
                return activityPrizeTiresEnum;
            }
        }
        return null;
    }
}
